package com.xiaomi.front.service.address;

import com.xiaomi.front.dao.Address.AddressDao;
import com.xiaomi.pojo.Address;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AddressImpl implements AddressService {

    @Autowired
    private AddressDao addressDao;

    //显示可用地址
    @Override
    public List<Address> addList(int id) {
        return addressDao.addList(id);
    }

    //修改地址表状态 不显示  删除功能
    @Override
    public int UpdateState(int aid, int uid) {
        return addressDao.UpdateState(aid, uid);
    }

    //修改地址
    @Override
    public int UpdateAddress(Address address) {
        return addressDao.UpdateAddress(address);
    }

    //添加地址
    @Override
    public int addAddress(Address address) {
        return addressDao.addAddress(address);
    }
}
